<?php
class FrmTableRoles{
	private $setter;
	private $dbOperator;
	private $dbConsult;
		
	function FrmTableRoles(){
		$this->dbConsult="SELECT id,nombre,descripcion FROM roles";
		$this->setter=new Setter("../../Config");
		
		$this->dbOperator=new DbOperator($this->setter->getDataBaseHost(),$this->setter->getDataBaseUserName(),$this->setter->getDataBaseName(),$this->setter->getDataBasePassword());
		$this->dbOperator->connect();
		$this->dbOperator->consult($this->dbConsult,"yes");
		$this->dbOperator->addIcon("editar","editar","editar","editar Rol","../../Themes/".$this->setter->getTheme()."/Images/editar.png","Editar este usuario","button",array("onclick"=>"tableInfoPOSTMethodSend(this.id,this.value,'tableRoles','../../Events/Admin/EventsFrmTableRoles.php')"));
		$this->dbOperator->addIcon("eliminar","eliminar","eliminar","eliminar Rol","../../Themes/".$this->setter->getTheme()."/Images/eliminar.png","Eliminar este usuario","button",array("onclick"=>"tableInfoPOSTMethodSend(this.id,this.value,'tableRoles','../../Events/Admin/EventsFrmTableRoles.php')"));
		$this->dbOperator->addIcon("masInfo","masInfo","masInfo","ver más información de este Rol","../../Themes/".$this->setter->getTheme()."/Images/info.png","Ver más sobre este usuario","button",array("onclick"=>"tableInfoPOSTMethodSend(this.id,this.value,'tableRoles','../../Events/Admin/EventsFrmTableRoles.php')"));
		$this->dbOperator->setReceptorName("tableRoles");
	}
	function setDbConsult($dbConsult="SELECT id,nombre,descripcion FROM roles"){
		$this->dbConsult=$dbConsult;	
		$this->dbOperator->consult($this->dbConsult,"yes");	
	}
	function getDbConsult(){
		return $this->dbConsult;
	}
	
	function show(){
		$this->dbOperator->show($eventsFile="../../Events/Admin/EventsFrmTableRoles.php", $titles=array("id","Nombre", "Descripcion"), $colFormats=array(),$colKey=0, $titleButtons="yes");
	}
}
?>